import { mockTickets } from "@/lib/data"
import PrintLayout from "@/components/tickets/PrintLayout"

export async function generateStaticParams() {
  return mockTickets.map(ticket => ({
    id: ticket.id,
  }))
}

export default function TicketPrintAfterPage({
  params,
}: {
  params: { id: string }
}) {
  const ticket = mockTickets.find(t => t.id === params.id)

  if (!ticket) {
    return <div>未找到操作票。</div>
  }

  return <PrintLayout ticket={ticket} printType="after" />
} 